package com.ruoyi.user.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 用户签到表对象 tb_sign
 *
 * @author 林道敬
 * @date 2025-01-11
 */

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_sign")
public class Sign extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(type = IdType.AUTO)
    private long id;

    /** 用户id */
    @Excel(name = "用户id")
    private String userId;

    /** 签到的年 */
    @Excel(name = "签到的年")
    private String year;

    /** 签到的月 */
    @Excel(name = "签到的月")
    private Long month;

    /** 签到的日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "签到的日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date date;

    /** 是否补签 */
    @Excel(name = "是否补签")
    private String isBackup;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public void setUserId(String userId)
    {
        this.userId = userId;
    }

    public String getUserId()
    {
        return userId;
    }
    public void setYear(String year)
    {
        this.year = year;
    }

    public String getYear()
    {
        return year;
    }
    public void setMonth(Long month)
    {
        this.month = month;
    }

    public Long getMonth()
    {
        return month;
    }
    public void setDate(Date date)
    {
        this.date = date;
    }

    public Date getDate()
    {
        return date;
    }
    public void setIsBackup(String isBackup)
    {
        this.isBackup = isBackup;
    }

    public String getIsBackup()
    {
        return isBackup;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("year", getYear())
            .append("month", getMonth())
            .append("date", getDate())
            .append("isBackup", getIsBackup())
            .toString();
    }
}
